package com.jjs.jcenterdemo.dagger2;

import android.content.Context;

import com.jjs.jcenterdemo.App;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by ytf on 2018/3/4 004.
 * Description:
 */

@Module
public class AppModule
{
    private Context mContext;

    public AppModule(Context mContext)
    {
        this.mContext = mContext;
    }

    @Provides
    public App provideApp()
    {
        return (App) mContext.getApplicationContext();
    }

    @Provides
    public Context provideContext()
    {
        return mContext;
    }
}
